// Copyright (c) 2008, 
// Marc Speck, http://www.faindu.com
// All Rights Reserved. The following is Source Code and is subject to all restrictions 
// on such code as contained in the license accompanying this product.
package com.faindu.editImage
{
	import com.faindu.editImage.base.IBaseTool;
	import com.faindu.editImage.base.IImageLoader;
	import com.faindu.editImage.crop.ICropTool;
	import com.faindu.editImage.flip.IFlipTool;
	import com.faindu.editImage.manipulations.IImageManipulations;
	import com.faindu.editImage.move.IMoveTool;
	import com.faindu.editImage.rotation.IRotateTool;
	
/**
 * Interface for handling EditImage in applications.
 */
public interface IEditImage extends IImageLoader
{
	//----------------------------------
	//  toolsInitialized
	//----------------------------------	
	/**
	 * Indicates whether the tools have been initialized. Tools are not initialized
	 * automatically. When the first tool gets enabled, all tools get initialized.
	 */
	function get toolsInitialized(): Boolean
	
	//----------------------------------
	//  transform tools
	//----------------------------------		
	/**
	 * Tool for moving the image around.
	 */
	function get moveTool(): IMoveTool
	
	/**
	 * Tool for changing the displayed size of the image.
	 */
	function get scaleTool(): IBaseTool

	/**
	 * Tool for rotating the image.
	 */
 	function get rotateTool(): IRotateTool 
	
	/**
	 * Tool for hiding parts of the displayed image.
	 */
	function get cropTool(): ICropTool
	
	/**
	 * Tool for flipping the image.
	 */
	function get flipTool(): IFlipTool
	
	//----------------------------------
	//  Image manipulations (also a tool)
	//----------------------------------	
	/**
	 * <code>ImageManipulations</code> handles the manipulations for component external use.
	 */
	function get imageManipulations(): IImageManipulations
	
	//----------------------------------
	//  snapToTop, snapToLeft
	//----------------------------------
	/**
	 * If true, the image is always moved to the initial top position.
	 */
	function get snapToTop(): Boolean
	function set snapToTop( value:Boolean ): void
	
	/**
	 * If true, the image is always moved to the initial left position.
	 */
	function get snapToLeft(): Boolean
	function set snapToLeft( value:Boolean ): void

	//----------------------------------
	//  controlSize
	//----------------------------------	
	/**
	 * Determines the default size of controls. Controls typically extend
	 * <code>BaseControl</code> and are display elements the user drags around.
	 */	
	function get controlSize(): uint 
	function set controlSize( value:uint ): void 

	//----------------------------------
	//  clone
	//----------------------------------		
	/**
	 * Returns a clone of <code>EditImage</code>. The image is cloned but no manipulations. To clone 
	 * the manipulations, use the following code:
	 * <listing version="3.0" >var clonedEditImage: IEditImage = editImage.clone()
	 * clonedEditImage.imageManipulations.imageEdits = editImage.imageManipulations.imageEdits</listing>
	 */
	function clone(): IEditImage
	
}
}